<script>
	var ProductExchangeSelectionPopupUrl = '<?php echo $this->getProductExchangeSelectionPopup(); ?>';
</script>
        
 <div class="entry-edit-head"> 
    <h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Process products'); ?></h4> 
</div>

<fieldset id="my-fieldset">
		<div class="grid">
        	<table class="data" cellspacing="0">
            	<thead>
	        		<tr class="headings">
	        			<th></th>
	        			<th class="a-center"><?php echo $this->__('Reason'); ?></th>
	        			<th class="a-center"><?php echo $this->__('No action'); ?></th>
	        			<th class="a-center"><?php echo $this->__('Return product'); ?></th>
	        			<th class="a-center"><?php echo $this->__('Refund'); ?></th>
	        			<th class="a-center"><?php echo $this->__('Exchange'); ?></th>
	        			<th class="a-center"><?php echo $this->__('Product destination'); ?></th>
	        		</tr>
        		</thead>
	            <tbody>
        		<?php foreach ($this->getRma()->getProducts() as $product): ?>
        			<?php if ($product->getrp_qty() == 0) { continue; } ?>
        			<tr>
        				<td><?php echo $product->getrp_qty().'x '.$this->getProductName($product); ?></td>
        				<td class="a-center"><?php echo $this->__($product->getrp_reason()); ?></td>
        				<?php if ($this->hasBeenProcessed($product)): ?>       				
	        				<td class="a-left" colspan="5"><?php echo $this->getProceedInformation($product); ?></td>        				
        				<?php else: ?>
	        				<td class="a-center"><?php echo $this->getNoActionHtml($product); ?></td>
	        				<td class="a-center"><?php echo $this->getReturnProductHtml($product); ?></td>
	        				<td class="a-center"><?php echo $this->getRefundHtml($product); ?></td>
	        				<td class="a-center"><?php echo $this->getExchangeHtml($product); ?></td>
	        				<td class="a-center"><?php echo $this->getProductDestinationHtml($product); ?></td>
	        			<?php endif; ?>
        			</tr>
        		<?php endforeach; ?>
        		</tbody>
        	</table>
        </div>
</fieldset>

<table border="0" width="100%">
<tr>
	<td width="50%">
		<div class="entry-edit-head"> 
	    	<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Credit memo settings'); ?></h4> 
		</div>
		<fieldset id="my-fieldset">
			<table cellspacing="0" class="form-list" id="block_action">	
				    <tr id="tr_refund_shipping">
	                    <td class="label"><?php echo $this->__('Refund shipping fees'); ?></td>
	                    <td class="input-ele"><input type="checkbox" name="data[refund_shipping_fees]" id="refund_shipping_fees" ></td>
	                </tr>
			</table>
		</fieldset>
	</td>
	<td width="50%">
		<div class="entry-edit-head"> 
	    	<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Order settings'); ?></h4> 
		</div>	
		<fieldset id="my-fieldset">
			<table cellspacing="0" class="form-list" id="block_action">	
				    <tr id="tr_payment_method">
	                    <td class="label"><?php echo $this->__('Payment Method'); ?></td>
	                    <td class="input-ele"><?php echo $this->getPaymentMethodAsCombo('data[payment_method]'); ?></td>
	                </tr>
					<tr id="tr_shipping_method">
	                    <td class="label"><?php echo $this->__('Shipping Method'); ?></td>
	                    <td class="input-ele"><?php echo $this->getCarriersAsCombo('data[rma_carrier]', $this->getRma()->getrma_carrier()); ?></td>
	                </tr>
	                <tr id="tr_shipping_cost">
	                    <td class="label"><?php echo $this->__('Shipping Cost'); ?> <?php echo $this->getTaxText(); ?></td>
	                    <td class="input-ele"><input type="text" name="data[rma_shipping_cost]" id="data[rma_shipping_cost]" value="0"></td>
	                </tr>
	                <tr id="tr_technical_cost">
	                    <td class="label"><?php echo $this->__('Technical Cost'); ?> <?php echo $this->getTaxText(); ?></td>
	                    <td class="input-ele"><input type="text" name="data[rma_technical_cost]" id="data[rma_technical_cost]" value="0"></td>
	                </tr>
	                <tr id="tr_technical_caption">
	                    <td class="label"><?php echo $this->__('Technical Cost Caption'); ?></td>
	                     <td class="input-ele"><input type="text" name="data[rma_libelle_action]" id="data[rma_libelle_action]" value=""></td>
	               </tr>
			</table>
		</fieldset>
	</td>
</tr>
</table>

